// ICodec.h: interface for the ICodec class.


#if !defined(AFX_ICODEC_H__A2DB1FB8_44CE_4D19_979D_9DE86180CE93__INCLUDED_)
#define AFX_ICODEC_H__A2DB1FB8_44CE_4D19_979D_9DE86180CE93__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

enum CODEC_TYPE {CODEC_MPEG4, CODEC_JPEG, CODEC_COSHIP_MPEG4, CODEC_COSHIP_H264, CODEC_XVID};
 
class ICodec  
{
public:
	virtual ~ICodec() {};
	virtual BOOL Init(const char* pbuf, int len) = 0;
	virtual void Destroy() = 0;
	virtual int GetWidth() = 0;
	virtual int GetHeight() = 0;
	virtual int GetBPP() = 0;
	virtual BOOL IsReversal() { return m_bReversal; };
	virtual BOOL Decode(const char* pbuf, int len, int subLen = 0) = 0;
	virtual void InitPicInfo() = 0;
	virtual char* GetPicBuff() = 0;
	virtual CODEC_TYPE GetCodecType() {return m_cType;}

protected:
	BOOL m_bReversal;
	CODEC_TYPE m_cType;
};

#endif // !defined(AFX_ICODEC_H__A2DB1FB8_44CE_4D19_979D_9DE86180CE93__INCLUDED_)
